package com.dominator.api.enums;


import com.dominator.api.utils.api.ApiMessage;

public enum  ReqEnums  {

    SYS_ERROR("400", "系统异常"),
    SYS_ROUTER_ILLEGAL("400", "请求路由规则参数缺失或路由规则不合法，请检查!"),
    SYS_ROUTER_LENTH_ILLEGAL("400", "请求路由规则不合法，请检查!"),

    QI_NIU_UPLOAD_ERROR("400", "七牛上传失败"),

    OCR_ERROR("400","ocr图片失败"),





    REQ_SUCCESS("200", "请求成功"),
    REQ_PARAM_MISS("102", "请求参数缺少"),
    REQ_TOKEN_FALSE("103", "请重新登陆"),
    REQ_INCORRECT_CODE("104", "短信验证码错误"),
    REQ_INCORECT_PIC_CODE("104", "图形验证码错误"),

    REQ_PARAM_ERROR("105", "请求参数错误"),
    REQ_PHONE_EXSIT("105", "手机号已存在"),
    REQ_SMS_LIMIT("105", "发送验证码次数超过限制"),
    REQ_WRONG_VERIFY_CODE("105", "验证码错误"),

    REQ_INVITE_PHONE_NOT_EXSIT("105", "邀请人手机号不存在"),
    REQ_USER_NOT_EXSIT("105", "用户不存在"),
    REQ_WRONG_PASSWORD("105", "用户密码错误"),
    REQ_CREATE_USER_ERROR("105", "创建用户失败"),
    REQ_USER_IS_NOT_VALID("105", "用户已被停用，请联系客服"),

    REQ_SMS_ERROR("111", "发送短信失败"),
    REQ_EMAIL_ERROR("112", "发送邮件失败"),

    ACC_IS_NULL("105", "金额不能为空"),
    ACC_ILLEGAL_AMOUNT("105", "金额不合法，请重新输入"),
    ACC_ILLEGAL_POINTS("105", "积分不合法，请重新输入"),

    ACC_NOT_EXSIT("105", "账户不存在"),
    ACC_LACK_OF_BALANCE("106","余额不足"),
    ACC_LACK_OF_POINTS("105","积分不足"),

    ENCODE_ERROR("105","加密失败"),
    REQ_ERROR("105","非法请求"),

    REQ_TOKEN_NULL("103","token为空"),
    REQ_TOKEN_ILLEGAL("103","token非法")

    ;



    /**
     * code
     */
    private String code;
    /**
     * msg
     */
    private String msg;


    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    private ReqEnums(String code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    @Override
    public String toString() {
        return new ApiMessage(this.code,this.msg).toString();
    }

}
